const route = require('koa-router')();
const User = require('../../model/user/user.js')

route.post('/set_info',async(ctx,next)=>{
    let reqData = {}
    ctx.request.body.user_name && (reqData.user_name = ctx.request.body.user_name)
    ctx.request.body.sex && (reqData.sex = ctx.request.body.sex)
    await User.update({user_id:ctx.request.body.user_id},{$set:reqData})
    ctx.body = {
        code:200,
        data:'ok'
    }
})

module.exports = route